//- 先去这个pug文件中找
extends shopHead_nav.pug

block append pageStyle
	link(href="${relativePath}/static/css/shopping/shopIndex.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/materFinished.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/service.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/search.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/colleague.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/hot.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/allkinds.css" rel="stylesheet" type="text/css")

block matrialContent
	//- 成品材料内容
	div.matrialCon.layout
		div.productsBox
			div.list
				ul
					li
						span.cur 当前位置：
						a(href="javascript:;")
							| 标识汇>
							a(href="./colleague.html") 同行
							| >产品分类>列表
		div.chioceBox
			div.list
				lable.name.fl 已选：
				div.chioce.chiocecom.fl
					div.type.fl
						a.alred.fl(href="javascript:;") 公司
					div.ejkinds.fl
						//- a.alred.fl(href="javascript:;") 成品材料
					div.areas.fl
						//- a.alred.fl(href="javascript:;") 北京
					//- div.clearfix
				div.clearfix
			div.list
				lable.name.fl 类型：
				div.comTypes.chioce.fl
					a.getchioce.kind.active.fl(href="javascript:;" type="1") 公司
					a.getchioce.kind.acvtive.fl(href="javascript:;"  type="2") 个人
					div.clearfix
				div.clearfix
			div.list
				lable.name.fl 分类：
				div.chioce.morebtn.fl
					div.cpcl.fl
					a.moreSelect.fr(href='javascript:;') 更多 
					div.clearfix
				div.clearfix
				//- 成品材料、定制加工二级分类
				div.twoWrap

			div.list
				lable.name.fl 地区：
				div.chioce.fl
					a.getchioce.area.fl(href="javascript:;") 北京
					a.getchioce.area.fl(href="javascript:;") 重庆
					a.getchioce.area.fl(href="javascript:;") 天津
					div.clearfix
				div.clearfix
		div.hot-box

		
	//- 三级分类列表模板
	script#threeList(type="text/html")
		| {{each data arr}}
		div.itemList
			lable.proname.fl {{arr.name}} ：
			div.rightList.fl
				| {{set two = arr.child}}
				| {{each two twolist}}
				a.fl(href="javascript:;" id="{{twolist.id}}") {{twolist.name}}
				| {{/each}}
			div.clearfix
		| {{/each}}
	//- 分类公司列表
	script#kindLists(type="text/html")
		| {{set data = data.companys}}
		| {{each data arr}}
		div.hot-list.fl
			div.leftImg.fl
				img(src="{{arr.company_logo}}")
				//- 工商标志
				| {{if arr.auth =='4'}}
				img.gsicon(src="${relativePath}/static/imgs/gs.png")
				| {{/if}}
			div.right-con.fl
				p.nowrap.com-name 
					| {{arr.name}}
					| {{if arr.leaguer_type ==2}}
					img(src="${relativePath}/static/imgs/zsr.png")
					| {{else if arr.leaguer_type ==1}}
					img(src="${relativePath}/static/imgs/zsb.png")
					| {{else if arr.leaguer_type ==3}}
					img(src="${relativePath}/static/imgs/zsy.png")
					| {{/if}}

				div.center.bottomt
					div.litte.nowrap.years.fl
						| {{if arr.auth =='4'}}
						img(src="${relativePath}/static/imgs/gsh.png")
						| {{else}}
						img(src="${relativePath}/static/imgs/gsg.png")
						| {{/if}}
						|   {{arr.year}}年
					div.litte.nowrap.address.fl
						img(src="${relativePath}/static/imgs/po.png")
						|   {{arr.area}}
					div.litte.nowrap.advice.fl
						|  {{arr.ad_market}}
					div.clearfix
				div.center.bottomp
					div.litte.nowrap.phone
						img(src="${relativePath}/static/imgs/phone2.png")  
						|  电话：{{arr.phone}}
				div.btm.hbtm
					| {{set list = arr.tags}}
					| {{each list tag}}
					a(href="javascript:;") {{tag.name}}
					| {{/each}}
				//- 定制下单按钮
				a.mized 定制下单
			div.clearfix
		| {{/each}}
	script#personList(type="text/html")
		| {{set data = data.members}}
		| {{each data arr}}
		div.hot-list.fl
			div.leftImg.fl
				img(src="{{arr.company_logo}}")
			div.right-con.fl
				p.nowrap.com-name.tjName 
					| {{arr.nice_name}}
					span.positonName {{arr.department_name}}
					| {{if arr.is_identification == 2}}
					img(src="${relativePath}/static/imgs/shi.png")
					| {{/if}}

				div.center.bottomt
					div.litte.nowrap.years.comname.fl
						| {{if arr.auth =='4'}}
						img(src="${relativePath}/static/imgs/gsh.png")
						| {{else}}
						img(src="${relativePath}/static/imgs/gsg.png")
						| {{/if}}
						|   {{arr.company_name==''?'暂无':arr.company_name}}
					div.clearfix
				div.center.bottomp
					div.litte.nowrap.phone
						img(src="${relativePath}/static/imgs/phone2.png")  
						|  电话：{{arr.phone}}
				div.btm.hbtm
					| {{set list = arr.tags}}
					| {{each list tag}}
					a(href="javascript:;") {{tag.name}}
					| {{/each}}
				//- 定制下单按钮
				a.mized 定制下单
			div.clearfix
		| {{/each}}
	//- 分页
	div.pageBox
		nav.pageNav
			div.paginationOne.page

block pageScript
	script(src="${relativePath}/static/js/shopping/kinds.js")

	script.
		
		$(function(){
			$("#colleague").addClass("active");
			$("#cpcl").click(function(){
				window.location.href='materFinished.html';
			});
			$("#hyfw1").click(function(){
				window.location.href='industryServiceIndex.html';
			});
			$("#index").click(function(){
				window.location.href='materIndex.html';
			});
			
			$(".left span").click(function(){
				$(this).addClass("current").siblings().removeClass("current");
			})
			getType(1)
			//- 获取分类列表
			getKinds(1,TYPE,THREEID)
			
			//- 点击二级分类
			$(".twoWrap").on("click",'.rightList a',function(){
				$(this).closest('.twoWrap').find('.active').removeClass('active');
				$(this).addClass('active')
				$(".ejkinds").html('<a class="alred fl">'+$(this).text()+'</a>')
				THREEID = $(this).attr('id')
				getKinds(1,TYPE,THREEID)
			})
		});